package com.boang.time;

import java.time.Instant;
import java.time.LocalDate;
import java.time.Period;

/*
    @author:sa
    @date:2024/11/22 11:21
*/
public class PeriodDemo {
    public static void main(String[] args) {
        LocalDate start=LocalDate.now();
        LocalDate end=LocalDate.of(2038,12,25);
        int years= Period.between(start,end).getYears();
        System.out.println(years);
        int days= Period.between(start,end).getDays();
        System.out.println(days);
    }
}